package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PropertyBuildingMapper;
import com.ruoyi.system.domain.PropertyBuilding;
import com.ruoyi.system.service.IPropertyBuildingService;

/**
 * 小区/楼宇信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyBuildingServiceImpl implements IPropertyBuildingService 
{
    @Autowired
    private PropertyBuildingMapper propertyBuildingMapper;

    /**
     * 查询小区/楼宇信息
     * 
     * @param buildingId 小区/楼宇信息主键
     * @return 小区/楼宇信息
     */
    @Override
    public PropertyBuilding selectPropertyBuildingByBuildingId(Long buildingId)
    {
        return propertyBuildingMapper.selectPropertyBuildingByBuildingId(buildingId);
    }

    /**
     * 查询小区/楼宇信息列表
     * 
     * @param propertyBuilding 小区/楼宇信息
     * @return 小区/楼宇信息
     */
    @Override
    public List<PropertyBuilding> selectPropertyBuildingList(PropertyBuilding propertyBuilding)
    {
        return propertyBuildingMapper.selectPropertyBuildingList(propertyBuilding);
    }

    /**
     * 新增小区/楼宇信息
     * 
     * @param propertyBuilding 小区/楼宇信息
     * @return 结果
     */
    @Override
    public int insertPropertyBuilding(PropertyBuilding propertyBuilding)
    {
        return propertyBuildingMapper.insertPropertyBuilding(propertyBuilding);
    }

    /**
     * 修改小区/楼宇信息
     * 
     * @param propertyBuilding 小区/楼宇信息
     * @return 结果
     */
    @Override
    public int updatePropertyBuilding(PropertyBuilding propertyBuilding)
    {
        return propertyBuildingMapper.updatePropertyBuilding(propertyBuilding);
    }

    /**
     * 批量删除小区/楼宇信息
     * 
     * @param buildingIds 需要删除的小区/楼宇信息主键
     * @return 结果
     */
    @Override
    public int deletePropertyBuildingByBuildingIds(Long[] buildingIds)
    {
        return propertyBuildingMapper.deletePropertyBuildingByBuildingIds(buildingIds);
    }

    /**
     * 删除小区/楼宇信息信息
     * 
     * @param buildingId 小区/楼宇信息主键
     * @return 结果
     */
    @Override
    public int deletePropertyBuildingByBuildingId(Long buildingId)
    {
        return propertyBuildingMapper.deletePropertyBuildingByBuildingId(buildingId);
    }
}
